﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<InternshipManagement.Models.ApplicationForm>" %>

<%@ Import Namespace="InternshipManagement.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ApplicationForm
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        ApplicationForm</h2>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>"
        type="text/javascript"></script>
    <% using (Html.BeginForm())
       { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset id="applicationform" class="twocolumns">
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Name)%>
        </div>
        <div class="editor-field">
            <%: Html.LabelFor(model => model.Name)%>
            <%: Html.EditorFor(model => model.Name)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Surname)%>
        </div>
        <div class="editor-field">
            <%: Html.LabelFor(model => model.Surname)%>
            <%: Html.EditorFor(model => model.Surname)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.StudentNumber)%>
        </div>
        <div class="editor-field">
            <%: Html.LabelFor(model => model.StudentNumber)%>
            <%: Html.EditorFor(model => model.StudentNumber)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Telephone1)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Telephone2)%>
        </div>
        <div class="editor-field" style="float: left; width: 250px; margin-right: 70px;">
            <%: Html.LabelFor(model => model.Telephone1)%>
            <%: Html.EditorFor(model => model.Telephone1)%>
        </div>
        <div class="editor-field" style="float: left; width: 180px;">
            <%: Html.LabelFor(model => model.Telephone2)%>
            <%: Html.EditorFor(model => model.Telephone2)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Email)%>
        </div>
        <div class="editor-field">
            <%: Html.LabelFor(model => model.Email)%>
            <%: Html.EditorFor(model => model.Email)%>
            <span style="line-height: 30px; float: left;">@ug.bilkent.edu.tr</span>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Address)%>
        </div>
        <div class="editor-field">
            <%: Html.LabelFor(model => model.Address)%>
            <%: Html.TextAreaFor(model => model.Address)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Year)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Advisor)%>
        </div>
        <div class="editor-field" style="float: left; width: 220px">
            <%: Html.LabelFor(model => model.Year)%>
            <%: Html.EditorFor(model => model.Year)%>
        </div>
        <div class="editor-field" style="float: left; width: 280px;">
            <%: Html.LabelFor(model => model.Advisor)%>
            <%: Html.EditorFor(model => model.Advisor)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.GPA)%>
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.CGPA)%>
        </div>
        <div class="editor-field" style="float: left; width: 220px; margin-right: 90px">
            <%: Html.LabelFor(model => model.GPA)%>
            <%: Html.EditorFor(model => model.GPA)%>
        </div>
        <div class="editor-field" style="float: left; width: 220px;">
            <%: Html.LabelFor(model => model.CGPA)%>
            <%: Html.EditorFor(model => model.CGPA)%>
        </div>
        <div class="editor-label" style="padding-top: 40px">
            STAJ YAPMAK İSTEDİĞİNİZ ŞEHRİ SEÇİNİZ.
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Cities)%>
        </div>
        <div class="editor-field">
            <%: Html.CustomCheckBoxFor(model => model.Ankara)%>
            <span style="margin-left: 5px;">Ankara</span>
        </div>
        <div class="editor-field">
            <%: Html.CustomCheckBoxFor(model=>model.Istanbul)%>
            <span style="margin-left: 5px;">İstanbul</span>
        </div>
        <div class="editor-field">
            <%: Html.CustomCheckBoxFor(model=>model.Izmir)%>
            <span style="margin-left: 5px;">İzmir</span>
        </div>
        <div class="editor-field checktextbox">
            <%: Html.CustomCheckBoxFor(model => model.OtherCityCheck)%>
            <span style="margin-left: 5px;">Diğer/Belirtiniz</span>
            <%: Html.TextBoxFor(model => model.OtherCities)%>
        </div>
        <div class="editor-field checktextbox">
            <%: Html.CustomCheckBoxFor(model => model.AbroadCityCheck)%>
            <span style="margin-left: 5px;">Yurtdışı/Belirtiniz</span>
            <%: Html.TextBoxFor(model => model.AbroadCities)%>
        </div>
        <div class="editor-label" style="padding-top: 40px">
            STAJINIZI YAPMAK İSTEDİĞİNİZ ALAN
            <br />
            (Tercih ettiğiniz alanı seçiniz. Bu seçimi yapan öğrencinin, o alanda staj yapabileceği,
            bölüm tarafından garanti edilemez.)
        </div>
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Branch)%>
        </div>
        <div class="editor-field">
            <%: Html.CustomCheckBoxFor(model => model.YazilimGelistirme)%>
            <span style="margin-left: 5px;">Yazılım Geliştirme</span>
        </div>
        <div class="editor-field">
            <%: Html.CustomCheckBoxFor(model => model.AgYonetimi)%>
            <span style="margin-left: 5px;">Ağ Yönetimi</span>
        </div>
        <div class="editor-field">
            <%: Html.CustomCheckBoxFor(model => model.SistemYonetimi)%>
            <span style="margin-left: 5px;">Sistem Yönetimi</span>
        </div>
        <div class="editor-field checktextbox">
            <%: Html.CustomCheckBoxFor(model => model.OtherBranchCheck)%>
            <span style="margin-left: 5px;">Diğer/Belirtiniz</span>
            <%: Html.TextBoxFor(model => model.OtherBranches)%>
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
    <% } %>
    <script type="text/javascript">
        jQuery(document).ready(function () {
            $('.checktextbox .customCheckbox').each(function () {
                $(this).click(function () {

                    $(this).siblings("input:text").toggle(); //.attr("disabled", "");
                    //                    if ($(this).next("input:hidden").val() == "false") {
                    //                        $(this).siblings("input:text").attr("disabled", "disabled");
                    //                        $(this).siblings("input:text").val("");
                    //                    }
                });
                $(this).siblings("input:text").show();
                if ($(this).next("input:hidden").val() == "false") {
                    $(this).siblings("input:text").hide();
                }
            });
        });

    </script>
</asp:Content>
